#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    int massage(vector<int>& nums)
    {
        int m = nums.size();
        if (m == 0)
            return 0;
        vector<int> f(m);
        auto g = f;
        f[0] = nums[0];
        for (int i = 1; i < m; i++)
        {
            f[i] = g[i - 1] + nums[i];
            g[i] = max(g[i - 1], f[i - 1]);
        }

        return max(f[m - 1], g[m - 1]);

    }
};


int main()
{
	return 0;
}